package com.example.lostandfoundsystem.models.system;

import com.example.lostandfoundsystem.models.common.base.BaseEntity;
import gaarason.database.annotation.Column;
import gaarason.database.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Repository;

/**
 * @author lucifer
 * @since 2024-07-17-21:35
 */
@Data
@ToString(callSuper = true)
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Table(name = "lost")
public class Lost extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @Column(name = "number", comment = "失物发布者学号")
    private String number;

    @Column(name = "lost_userId", comment = "失主")
    private String lostUserId;

    @Column(name = "found_userId", comment = "拾到者")
    private String foundUserId;

    @Column(name = "description", comment = "失物描述")
    private String description;

    @Column(name = "status", comment = "失物状态")
    private String status;

    @Column(name = "qq_code", comment = "QQ号")
    private String qqCode;

    @Column(name = "wechat_code", comment = "微信号")
    private String wechatCode;

    @Repository
    public static class Model extends BaseModel<Lost, Long> {
        @Override
        protected boolean softDeleting() {
            return true;
        }
    }
}
